package com.defysoft.waukids.attend;

import android.os.Bundle;

import com.defysoft.waukids.BaseActivity;
import com.defysoft.waukids.R;
import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.nostra13.universalimageloader.core.assist.ImageScaleType;
import com.nostra13.universalimageloader.core.assist.QueueProcessingType;
import com.polites.android.GestureImageView;

public class Attend_SelectDay_Photo_A extends BaseActivity {
	String photo;
	GestureImageView gv;
	ImageLoader imageLoader;
	DisplayImageOptions options;
	
	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		setContentView(R.layout.attend_selectday_photo_a);
		photo = getIntent().getStringExtra("photo");
		gv = (GestureImageView)findViewById(R.id.ATTEND_SELECTDAY_PHOTO_IV);

		//이미지 세팅.
		ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(
				this).threadPriority(Thread.NORM_PRIORITY - 2)
				.denyCacheImageMultipleSizesInMemory()
				.discCacheFileNameGenerator(new Md5FileNameGenerator())
				.tasksProcessingOrder(QueueProcessingType.LIFO)
				.writeDebugLogs() // Remove for release app
				.build();
		// Initialize ImageLoader with configuration.
		ImageLoader.getInstance().init(config);
		imageLoader = ImageLoader.getInstance();
		imageLoader.clearDiskCache();
		imageLoader.clearMemoryCache();

		options = new DisplayImageOptions.Builder().cacheInMemory(true)
				.showImageOnFail(R.drawable.logo)
				.imageScaleType(ImageScaleType.EXACTLY).cacheOnDisc(true)
				.considerExifParams(true).build();
		imageLoader.displayImage(photo, gv, options, null);
	}
}
